<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../resources/common/page/sessionovertime.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>用户管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<script type="text/javascript" src="<%=basePath%>resources/common/viewHistory.js"></script>
    <script type="text/javascript" src="user.js"></script>
    <style type="text/css">
    .userTd{width: 109px;font-size: 13px;height: 30px;border-right: 1px solid #dcdcdc;border-bottom:1px solid #dcdcdc }
    .userTds{font-size: 14px;height: 30px;border-bottom:1px solid #dcdcdc;font-weight: bold; }
    </style>
  </head>
  <body class="easyui-layout">
  	<div data-options="region:'center',title:'用户列表'">
   		<div id="toolbar" style="height:auto;">
  		<table  style="line-height:80px;">
		  	<tr align="left">
		  		<td width="100" align="right">工号:</td>
		  		<td width="100" align="left"><input class="easyui-textbox" value="" id="workNumber" data-options="prompt:'模糊查询'"/></td>
		  		<td width="100" align="right">用户名:</td>
		  		<td width="100" align="left"><input class="easyui-textbox" value="" id="userName" data-options="prompt:'模糊查询'" /></td>
		  		<td width="100" align="right">真实姓名:</td>
		  		<td width="100" align="left"><input class="easyui-textbox" value="" id="realName" data-options="prompt:'模糊查询'"/></td>
		  	</tr>
		</table>
		<div style="margin-left:-2px;margin-right:-2px;" class="toolbuttonbg">
	        <a href="javaScript:openDialog_addPortal();" name="user_add" style="float:left;" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:openDialog_editPortal();" name="user_editor" style="float:left;" class="easyui-linkbutton" iconCls="icon-edit" plain="true">编辑</a>
	       	<div class="datagrid-btn-separator"></div>
	        <a href="javaScript:delPortal();" name="user_delete" style="float:left;" class="easyui-linkbutton" iconCls="icon-cancel" plain="true">删除</a>
	       	<div class="datagrid-btn-separator"></div>
	       	<a href="javaScript:viewHistory('sys_user', 'userId');" name="user_viewhistory" style="float:left;" class="easyui-linkbutton" iconCls="icon-viewsdetail" plain="true">操作日志</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" name="user_enable" style="float:left;" class="easyui-linkbutton" id="enableBtn" iconCls="icon-ok" plain="true" onclick="enable()">启用</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" name="user_disable" style="float:left;" class="easyui-linkbutton" id="disableBtn" iconCls="icon-no" plain="true" onclick="enable()">禁用</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:reloads();" name="user_refresh" style="float:left;" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javascript:queryUser();" name="user_query" class="easyui-linkbutton" iconCls="icon-search" plain="true">查询</a>
	    </div>
	</div>  
    <!-- 表格 -->
    <table id="dataGridTable"  fit="true"  pagination="true" rownumbers="true" toolbar="#toolbar" singleSelect="true" fitColumns="false" striped="true" url="sys/findUser.action"data-options="onSelect:doEvent,onClickRow:userFrameMod">
    </table> 
   	</div>
   	<div  data-options="region:'east',title:'用户详细信息',collapsible:false,split:true,minWidth:350" style="width:350px;">
 		<div  class="toolbuttonbg" >
	        <a href="javaScript:;" style="float:left;" class="easyui-linkbutton" iconCls="icon-man" plain="true" onclick="userInfos()">基本</a>
	        <div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" style="float:left;" class="easyui-linkbutton" iconCls="icon-lock" plain="true" onclick="userRoleNames()">角色</a>
	       	<div class="datagrid-btn-separator"></div>
	        <a href="javaScript:;" class="easyui-linkbutton" iconCls="icon-more" plain="true" onclick="userMore()">其他</a>
	    </div>
 		<table width="100%" id="userInfos">
 		 	<tr>
 			<td class="userTd">工号</td>
 				<td class="userTds"  id="u_workNumber">&nbsp;</td>
 			</tr>
 			<tr>
 				<td class="userTd">用户名</td>
 				<td class="userTds" id="u_userName">&nbsp;</td>
 			</tr>
 			<tr>
 				<td class="userTd">真实姓名</td>
 				<td class="userTds" id="u_realName">&nbsp;</td>
 			</tr>
 			<tr>
 				<td class="userTd">性别</td>
 				<td class="userTds" id="u_userGender">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">出生日期</td>
	 			<td class="userTds" id="u_birthDay">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">电子邮箱</td>
	 			<td class="userTds" id="u_userEmail">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">手机号码</td>
	 			<td class="userTds" id="u_mobileNum">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">电话号码</td>
	 			<td class="userTds" id="u_phoneNum">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">QQ</td>
	 			<td class="userTds" id="u_qqNum">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">联系地址</td>
	 			<td class="userTds" id="u_userAddress">&nbsp;</td>
 			</tr>
 		</table>
 		<table width="100%" id="userRoleNames">
 			<tr>
 				<td class="userTd" >角色</td>
 				
 				<td class="userTds" id="u_roles">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">组织架构</td>
	 			<td class="userTds" id="u_departmentId">&nbsp;</td>
 			</tr>
 		</table>
 		<table width="100%" id="userMore">
			 <tr>
	 			<td class="userTd">登录次数</td>
	 			<td class="userTds" id="u_userCount">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">最近一次登录时间</td>
	 			<td class="userTds" id="u_lastLoginTime">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">记录建立者 </td>
	 			<td class="userTds" id="u_createUser">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">记录建立者时间</td>
	 			<td class="userTds" id="u_createTime">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">记录最后修改者</td>
	 			<td class="userTds" id="u_lastModifiedUser">&nbsp;</td>
 			</tr>
 			<tr>
	 			<td class="userTd">记录最后修改时间</td>
	 			<td class="userTds" id="u_lastModifiedTime">&nbsp;</td>
 			</tr>
 		</table>
 	</div>

  	<!-- 编辑/新增面板-->
	<div id="portalInfoDialog" iconCls="icon-save" style="padding: 5px; width: 650px; height: 350px;">
		<div class="easyui-layout" fit="true">
		  	<div region="center" border="false" style="padding: 5px;" >
		  	<input type="hidden" id="accountCount" name="accountCount"/>
		    <table>
	    		<tr height="30">
	    			<td width="100" align="right">工号：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="workNumberInfo" data-options="required:true,missingMessage:'该输入项为必输项'" ></input></td>
	          		<td width="87" align="right">用户名：<input type="hidden" id="userIdInfo"></td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="userNameInfo" data-options="required:true,missingMessage:'该输入项为必输项'"></input></td>
	        	</tr>
	    		<tr height="30">
	    			<td width="100" align="right">真实姓名：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="realNameInfo" data-options="required:true,missingMessage:'该输入项为必输项'"></input></td>
	          		<td width="87" align="right">性别：</td>
	        		<td width="100" align="left">
	        		<select class="easyui-combobox" style="width:135;" editable="false" id="userGenderInfo">
	        		<option value="0">未知</option>
	        		<option value="1">女</option>
	        		<option value="2">男</option>
	        		</select>
	        		</td>
				</tr>
	        	<tr height="30">
	          		<td width="100" align="right">手机号码：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="mobileNumInfo" data-options="required:true,missingMessage:'该输入项为必输项'" ></input></td>
	        		<td width="87" align="right">出生日期：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-datebox" id="birthDayInfo" data-options="editable:false"></input></td>
				</tr>
	        	<tr height="30">
	        		<td width="100" align="right">电子邮箱：</td>
	          		<td width="200" align="left"><input type="text" class="easyui-textbox" id="userEmailInfo"  data-options="required:true,validType:'email',missingMessage:'该输入项为必输项'" ></input></td>
					<td width="87" align="right">QQ：</td>
	          		<td width="200" align="left"><input type="text" class="easyui-textbox" id="qqNumInfo"></input></td>
	        	</tr>
	        	<tr height="30">
	        	    <td width="100" align="right">电话号码：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="phoneNumInfo"></input></td>
	          		<td width="87" align="right">联系地址：</td>
	          		<td width="100" align="left"><input type="text" class="easyui-textbox" id="userAddressInfo" ></input></td>
	        	</tr>
	        	<tr height="30">
	          		<td width="100" align="right">角色：</td>
	          		<td width="100" align="left" colspan="3">
	          			<select id="roleIds" class="easyui-combogrid" style="width:430px;">
				     </select>
				     <input id="userRolesIds" type="hidden" value="0"/>
	          		</td>
	        	</tr>
	        	<tr height="30">
	          		<td width="100" align="right">组织架构：</td>
	          		<td width="100" align="left" colspan="3">
					<input id="user_departmentId" class="easyui-combotree" style="width:430px;" data-options="required:true,missingMessage:'该输入项为必输项'" />
	          		</td>
	        	</tr>
	  		</table>
		    </div>
	 	</div>
	 </div>
	<%@ include file="../../resources/common/page/viewHistory.jsp"%>
  </body>
</html>
<%@ include file="../../resources/common/page/button.jsp"%>